<cp-navbar [leftArrow]="false"></cp-navbar>
<div class="error" *ngIf="error"><cp-error (reload)="handleReload()"></cp-error></div>
<div class="loading" *ngIf="loading"><cp-loading></cp-loading></div>
<div class="container" *ngIf="!error && !loading">
  <div class="list" *ngIf="list.length > 0">
    <div class="gutter"></div>
    <div class="item" *ngFor="let item of list; trackBy: trackByFn">
      <div class="header" (click)="navigateTo(item.Url)">
        <img [src]="item.Avatar" class="avatar" *ngIf="item.Avatar" />
        <div class="txtbox">
          <p class="topic">{{ item.Topic }}</p>
          <p class="time">{{ item.UpdateTime }}</p>
        </div>
      </div>
      <div class="body">
        <pre class="description" [innerHTML]="item.Description" *ngIf="item.Description"></pre>
        <div class="imgs">
          <div
            class="imgbox"
            *ngFor="let src of item.Imgs; index as index"
            (click)="showImgView(item.Imgs, index, item.Topic, item.Description)"
          >
            <img [src]="src" class="thumb" />
          </div>
        </div>
      </div>
    </div>
  </div>
  <cp-loadmore *ngIf="list.length > 0 && !nomore"></cp-loadmore>
  <cp-nomore *ngIf="list.length > 0 && nomore"></cp-nomore>
  <div class="empty" *ngIf="list.length === 0"><cp-empty></cp-empty></div>
  <cp-image-view
    [list]="imgview.list"
    [(show)]="imgview.show"
    [(index)]="imgview.index"
    [config]="sliderConfig"
  ></cp-image-view>
</div>
<cp-tabbar></cp-tabbar>
